package com.julius.design.pattern.prototype;

/**
 * <p>
 *      抽象形状类
 * </p>
 */
public abstract class Shape implements Cloneable {

    private String id;

    //包作用域
    protected String type;


    @Override
    protected Object clone() throws CloneNotSupportedException {
        //浅拷贝 如果需要不进行引用传递，请使用序列化方式的深拷贝
        return super.clone();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType(){
        return type;
    }
}
